package com.tvunetworks.center.user.controller;

import com.tvunetworks.center.common.util.Result;
import com.tvunetworks.center.common.util.ResultUtil;
import com.tvunetworks.center.user.model.vo.GridEventRecordVo;
import com.tvunetworks.center.user.service.GridEventRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: tvucc-aggregator
 * @description: GridEventRecordController
 * @author lebronchen
 * @create: 2020-01-07 19:11
 **/
@RestController
@RequestMapping("/gridEventRecord")
public class GridEventRecordController {

    @Autowired
    private GridEventRecordService gridEventRecordService;

    /**
     *
     * @param id id
     * @return Result
     */
    @GetMapping("/listRecord")
    public Result listRecord(@RequestParam String id) {
        GridEventRecordVo vo = gridEventRecordService.listEventRecord(id);
        return ResultUtil.success(vo);
    }
}
